package org.torproject.android;

import android.os.Parcel;
import android.os.Parcelable;

public class BandwidthData implements Parcelable {
	public long read;
	public long write;
	
	public int describeContents() {
		return 0;
	}
	
	public void writeToParcel(Parcel arg0, int arg1) {
		arg0.writeLong(read);
		arg0.writeLong(write);
	}
	
	private BandwidthData(Parcel p) {
		read = p.readLong();
		write = p.readLong();
	}
	
	public BandwidthData(long read, long write) {
		this.read = read;
		this.write = write;
	}
	
	public static final Parcelable.Creator<BandwidthData> CREATOR = new Parcelable.Creator<BandwidthData>() {
		public BandwidthData createFromParcel(Parcel in) {
			return new BandwidthData(in);
		}

		public BandwidthData[] newArray(int size) {
			return new BandwidthData[size];
		}
	};
}